﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BeachRunner.Menu
{
    /// <summary>
    /// Verwaltet alle Menüseiten
    /// 
    /// Autor Mathias Müller, OLD (Mattis Hänel)
    /// </summary>
    public class MenuManager
    {
        /// <summary>
        /// Hauptmenüseite
        /// </summary>
        private MainMenuPage mainMenuPage;

        public MainMenuPage MainMenuPage
        {
            get { return mainMenuPage; }
            set { mainMenuPage = value; }
        }

        /// <summary>
        /// Hilfeseite
        /// </summary>
        private HelpPage helpPage;

        public HelpPage HelpPage
        {
            get { return helpPage; }
            set { helpPage = value; }
        }

        /// <summary>
        /// Die momentan anzuzeigende Menüseite
        /// </summary>
        private Page currentPage;
        /// <summary>
        /// Macht die momentan anzuzeigende Menüseite zugänglich
        /// </summary>
        public Page CurrentPage
        {
            get { return currentPage; }
            set 
            {
                currentPage = value;
                currentPage.Init();
            }
        }

        /// <summary>
        /// Erstellt einen neuen Menümanager
        /// </summary>
        public MenuManager()
        {
            mainMenuPage = new MainMenuPage(this,1);
            helpPage = new HelpPage(this);
        }
    }
}
